package cn.hzc.fortess.core;

import cn.hzc.fortess.core.common.SpringContextHolder;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.web.context.WebApplicationContext;

@Component
@Scope(scopeName = WebApplicationContext.SCOPE_SESSION)
public class SessionDataHolder implements java.io.Serializable {

    private Object data = null;

    public void set(Object data) {
        this.data = data;
    }

    public Object get() {
        return data;
    }

    public final static SessionDataHolder me() {
        return SpringContextHolder.getBean(SessionDataHolder.class);
    }
}
